@extends('home.layout.base')
@section('title', '个人中心')
@section('pluginstyle')
<script>var _isindex = 0;</script>
<script type="text/javascript">
    window.pageConfig = {
        compatible: true
    };
</script>
<link type="text/css" rel="stylesheet" href="{{  asset('/dist/home/css/jd/a_002.css') }}">
<link type="text/css" rel="stylesheet" href="{{  asset('/dist/home/css/jd/a.css') }}" source="widget">
<link type="text/css" rel="stylesheet" href="{{  asset('/dist/home/css/jd/common.css') }}" source="widget">
<script language="javascript" type="text/javascript">
    if (window.top !== window.self) {
        window.top.location = window.location;
    }
</script>
<link href="{{  asset('/dist/home/css/jd/tips.css') }}" rel="stylesheet" charset="utf-8">
<script src="{{ asset('/dist/home/js/1102.js') }}"></script>
<style type="text/css">
    .status{
        margin-left: 25px;
    }
    .status a{
        font-size: 14px;
    }
</style>
<link rel=stylesheet href="{{ asset('/dist/home/css/qikoo_user.css') }}">
<link type="text/css" rel="stylesheet" href="{{  asset('/dist/home/css/jd/myjd.css') }}" source="combo">
@endsection
@section('content')
<div class="user-body">
    <div class="user-container">
        <div class="user-crumbs m-b-10">
            <a href="{{ url('/user') }}">首页</a> > 我的订单
        </div>
        <div class="clearfix_new">
            @include('home.user.menu')
            <div class="user-main">
                <div class="" >
                    <div id="content" style="margin-top: -20px; width: 1070px;">
                        <div id="main">
                            @if(isset($error))
                            <div class="safety-box">
                                {{ $error }}
                            </div>
                            @endif
                            <div class="mod-main mod-comm lefta-box" id="order02">
                                <div class="mt">
                                    <div class="extra-r">
                                        <form action="{{ url('/user') }}" method="post">
                                        <div class="search">
                                            <input type="hidden" name="_token" value="{{csrf_token()}}" >
                                            <input style="color: rgb(204, 204, 204);" id="ip_keyword" class="itxt" placeholder="商品名称/订单号" type="text" name="keyword" value="{{$keyword}}">
                                            <input type="submit"class="search-btn" style="background-image: url('/dist/home/images/jd/ss.jpg')" value="搜索">
                                        </div>
                                        </form>
                                    </div>
                                </div>
                                <div class="mc" >
                                    <div class="top-search hide">
                                        <div class="dl">
                                            <span class="label">订单类型：</span>

                                        </div>
                                        <div class="dl">
                                            <a href="#none" clstag="click|keycount|orderlist|fanhui"
                                               class="btn-9">返回</a>
                                        </div>
                                        <a href="#none" clstag="click|keycount|orderlist|closehighserach"
                                           class="ts-del"></a>
                                    </div>
                                {{--商品参照--}}
                                @foreach( $orders as $s)
                                <table class="td-void order-tb">
                                    <colgroup>
                                    <col class="operate-col">
                                    <col class="consignee-col">
                                    <col class="number-col">
                                    </colgroup>
                                <tbody id="tb{{$s->order_number}}">
                                <tr class="sep-row">
                                    <td colspan="5"></td>
                                </tr>
                                {{--创建时间--}}
                                <tr class="tr-th">
                                    <td colspan="5">
                                        <span class="gap"></span>
                                        <span class="dealtime" title="2016-06-22 08:43:40">{{$s->order_time}}</span>
                                        <span class="number">订单号：
                                            <a name="orderIdLinks" id="idUrl19837282916" target="_blank" href="">{{$s->order_number}}</a>
                                        </span>
                                    </td>
                                </tr>
                                <tr class="tr-bd" id="track19837282916" oty="0,4,70">
                                    <td>
                                        {{--商品名称--}}
                                        @foreach($s->details as $g)
                                        <div class="goods-item p-1608299">
                                            <div data-lazy-img-install="1" class="p-img">
                                                <a href="{{ url('/item',[$g->goods_id]) }}" target="_blank" title=" ">
                                                    <img class="err-product" src="{{ $g->goods_thumb }}" height="60" width="60">
                                                </a>
                                            </div>
                                            <div class="p-msg">
                                                <div class="p-name">
                                                    <a href="{{ url('/item',[$g->goods_id]) }}" class="a-link" target="_blank" title=" 商品名称">
                                                        {{ $g->order_goodsname }}
                                                    </a>
                                                </div>
                                            </div>
                                        </div>
                                        {{--商品数量--}}
                                        <div class="goods-number">
                                            x{{ $g->order_goodsnumber }}
                                        </div>
                                        <div class="goods-number">
                                            @if (($g->order_status) == 1 )
                                            <a href="javascript:void(0);" class="btn-again btn-again-show">
                                                <b></b>等待发货
                                            </a>
                                            @elseif (($g->order_status) == 2 )
                                            <a href="{{ url('/order/shou', [$g->id]) }}" class="btn-again btn-again-show">
                                                <b></b>确认收货
                                            </a>
                                            @elseif  (($g->order_status) == 3 )
                                            <a href="{{ url('/comment',[$g->id]) }}" class="btn-again btn-again-show">
                                                <b></b>去评价
                                            </a>
                                            @elseif  (($g->order_status) == 4 )
                                            <a href="" class="btn-again btn-again-show" onclick="return false;">
                                                <b></b>已评价
                                            </a>
                                             @elseif (($g->order_status) == 0 )
                                            <a href="{{ url('/order/processing') }}" class="btn-again btn-again-show" target="_blank">
                                                <b></b>去付款
                                            </a>
                                            @endif
                                        </div>
                                        @endforeach
                                        <div class="clr"></div>
                                    </td>
                                    <td rowspan="1">
                                        {{--商品总额--}}
                                        <div class="amount">
                                            <span>总额 &#165;{{ $s->order_total }}</span> <br>
                                            <span class="ftx-13">在线支付</span>
                                        </div>
                                    </td>
                                    <td rowspan="1">
                                        {{--收货地址--}}
                                        <div class="consignee tooltip">
                                            <span class="txt">{{ $s->order_name }}</span>
                                            <b></b>
                                            <div>
                                                <div class="pc prompt-01 prompt-02"  style="display: none;">
                                                    <strong>{{ $s->order_address }}</strong>
                                                </div>
                                                <div class="p-arrow p-arrow-left"></div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                                </tbody>
                                </table>
                                @endforeach
                                <div class="mt20">
                                    <div class="pagin fr">
                                        {!! $orders->appends(["keyword" => $keyword])->render() !!}
                                    </div>
                                    <div class="clr"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="ui-slidebar">
                    <div class="dl">
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection
@section('pluginscript')
<script>
    $(function() {
        $("span[class='txt']").mouseover(function() {

            $(this).siblings('div').children(".pc").slideDown("fast");
        });
        $("span[class='txt']").mouseout(function() {
            $(".pc").slideUp("fast");
        });

    });
</script>
@endsection